package com.lmf.eduservice.controller;

import com.lmf.resultCode.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

@Api("登录管理")
@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin    //解决跨域问题
public class EduLoginController {

    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("info")
    public R getInfo(){
//        return R.ok().data("roles","admin").data("name","刘明福").data("avatar","http://www.weixintouxiang.cn/weixin/20140607090832328.gif");
        return R.ok().data("roles","admin").data("name","刘明福").data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
//        return R.ok().data("roles","admin").data("name","刘明福").data("avatar","https://e037com.oss-cn-shanghai.aliyuncs.com/wp-content/uploads/2019/10/2019101300591336.gif");
    }
}
